//创建线程
#include <func.h>

void* thread_func(void *p)
{
    printf("I am child thread, %lu\n",pthread_self());
    return NULL;
}

int main()
{
    pthread_t th_id;
    // struct timeval start,end;
    // gettimeofday(&start,NULL);
    int ret=pthread_create(&th_id,NULL,thread_func,NULL);//创建线程
    THREAD_ERR_CHECK(ret,"pthread_create");
    printf("I am main thread %lu\n",pthread_self());
    sleep(1);
    return 0;
}